#{extends 'padrao.html' /}
#{set title:'formEditarCerimonia.html' /}

 <!-- Form editar de cerimonia-->
 
	<form id="formEditarCerimonia" name="formEditarCerimonia" method="POST" action="@{Cerimonia.editarCerimonia()}" >
	<input type="hidden" name = "aCodCerimonia" value="${cerimonia.getCodCerimonia()}"/>
	<h3>Alterar Cerimonia</h3>
		<table>
			<tr>
				<td>Descrição</td>
				<td>Data</td>
				<td>Celebrante</td>
				<td>Estado</td>
				<td>Celebração</td>
				<td>Qtd. Sacramentos</td>
				<td>Igreja</td>
			</tr>
			<tr>
				<td><input size = "25px"type="text" name="aDescricao" value="${cerimonia.getDescricao()}"/></td>
				<td><input size = "10px"type="text" name="aDataCerimonia" value="${cerimonia.getDataCerimonia()}"/></td>
				<td>
					<select name="aCodCelebrante">
						#{list items: celebrantes,as: 'celebrante'}
							<option value = ${celebrante.getCodCelebrante()}>${celebrante.getNome()}</option>
						#{/list}
					</select>
				</td>
				<td>
					<select name="aEstado">
						<option value="1">Aberta</option>
						<option value="2">Lotada</option>
						<option value="0">Realizada</option>
					</select>
				</td>
				<td><input size = "15px"type="text" name="aCodTipoCelebracao" value="${tipocerimonia.getSigla()}"/></td>
				<td><input size = "17px"type="text" name="aQtdSacramentos" value="${cerimonia.getQtdSacramentos()}"/></td>
				<td>
					<select name="aCodIgreja">
						#{list items: igrejas,as: 'igreja'}
							<option value = ${igreja.getCodIgreja()}>${igreja.getNome()}</option>
						#{/list}	
					</select>
				</td>
			</tr>
			<tr>
				<td>
					<input type="submit" id="btConfirmar" value="Cadastrar"/>
					<input type="button" id="btCancelar"  name="btCancelar" value="Cancelar" onclick = "javascript:window.location = '@{VSecretaria.formCadastrarCerimonia(0,"")}'"/>
				</td>
				<td></td>
			<tr>
		</table>
	</form>  